package com.abbcc.models;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.httpclient.util.DateUtil;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.search.annotations.DocumentId;

import com.abbcc.util.IDUtil;

@Entity
@Table(name = "p_crk")
public class TdCrk {
	private int crkId;
	private String proType;
	private String guige;
	private int zrcs;
	private int jrrk;
	private int jrck;
	private int dtcs;
	private Date addTime;
	private Date updateTime;
	private String addName;
	@Id 
	@Column(name="crk_id") 
	public int getCrkId() {
		return crkId;
	}
	public void setCrkId(int crkId) {
		this.crkId = crkId;
	}
	public String getProType() {
		return proType;
	}
	public void setProType(String proType) {
		this.proType = proType;
	}
	public String getGuige() {
		return guige;
	}
	public void setGuige(String guige) {
		this.guige = guige;
	}
	public int getZrcs() {
		return zrcs;
	}
	public void setZrcs(int zrcs) {
		this.zrcs = zrcs;
	}
	public int getJrrk() {
		return jrrk;
	}
	public void setJrrk(int jrrk) {
		this.jrrk = jrrk;
	}
	public int getJrck() {
		return jrck;
	}
	public void setJrck(int jrck) {
		this.jrck = jrck;
	}
	public int getDtcs() {
		return dtcs;
	}
	public void setDtcs(int dtcs) {
		this.dtcs = dtcs;
	}
	@Column(name="add_time") 
	public Date getAddTime() {
		return addTime;
	}
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	@Column(name="update_time") 
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Column(name="add_name") 
	public String getAddName() {
		return addName;
	}
	public void setAddName(String addName) {
		this.addName = addName;
	}
	public String pClass(){
		SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd"); 
		String t =  f.format(this.getAddTime());
		String d =  f.format(new Date());
		if(t.equals(d))
			return "pvalue1";
		return "";
	}
}
